package jmine.tec.web.front.report;

import jmine.tec.report.impl.table.CellValueResolver;
import jmine.tec.web.front.domain.BackOfficeRequest;
import jmine.tec.web.front.domain.BackOfficeRequestProperty;

/**
 * Resolvers a request property value
 * 
 * @author lundberg
 */
public class RequestPropertyResolver implements CellValueResolver<BackOfficeRequest> {

    private final BackOfficeRequestProperty property;

    /**
     * Constructor
     * 
     * @param property property
     */
    public RequestPropertyResolver(BackOfficeRequestProperty property) {
        this.property = property;
    }

    /**
     * {@inheritDoc}
     */
    public Object resolveCellValue(BackOfficeRequest rowValue) {
        return rowValue.getRequestValue(Object.class, this.property);
    }

}